package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import org.springframework.jdbc.core.RowMapper;

import com.estore.info.ProductInfo;

public class ProductInfoMapper implements RowMapper<ProductInfo> {

	@Override
	public ProductInfo mapRow(ResultSet rs, int arg1) throws SQLException {
		ProductInfo info = new ProductInfo();
		info.setProductName(rs.getString("productName"));
		info.setCatName(rs.getString("catName"));
		info.setBrandName(rs.getString("brandName"));
		info.setProductID(rs.getString("productid"));
		info.setAddDate(rs.getString("adddate"));
		info.setCatID(rs.getInt("catid"));
		info.setBrandID(rs.getInt("brandid"));
		info.setContentOfWeb(rs.getString("contentofweb"));
		return info;
	}

}
